<div th:if="*{featuredProduct}" class="new_badge">Nuevo!</div>

<div class="image">
	<a th:href="@{*{url}}">
	<img th:if="*{media['primary']}" th:src="@{*{media['primary'].url}}" alt="Sauce Image" />
	<div class="price" th:if="${#object instanceof T(org.broadleafcommerce.core.catalog.domain.ProductBundle)}">
		<div blc:price="*{salePrice}" th:if="*{onSale}" th:classappend="*{defaultSku.onSale}? 'sale'"></div>
		<div blc:price="*{retailPrice}" th:classappend="*{onSale}? 'has-sale'"></div>
	</div>
	<div class="price" th:unless="${#object instanceof T(org.broadleafcommerce.core.catalog.domain.ProductBundle)}">
		<div blc:price="*{defaultSku.salePrice}" th:if="*{defaultSku.onSale}" th:classappend="*{defaultSku.onSale}? 'sale'"></div>
		<div blc:price="*{defaultSku.retailPrice}" th:classappend="*{defaultSku.onSale}? 'has-sale'"></div>
	</div>
	</a>
</div>

<div class="content">
	<div class="title" th:text="*{name}"></div>
	<p th:utext="*{longDescription}"></p>
</div>

<div th:class="*{'productActions productActions' + id}">

	<div class="in_cart" th:classappend="${!cart.containsSku(#object.defaultSku)}? ' hidden'">
		<a class="fancycart fancybox.ajax inCart" th:href="@{/cart}">En Carrito!</a>
	</div>
	
	<div class="add_to_cart" th:classappend="${cart.containsSku(#object.defaultSku)}? ' hidden'">
		<blc:form method="POST" th:action="@{/cart/add}">
			<input type="hidden" name="productId" th:value="*{id}" />
			<input type="hidden" name="quantity" value="1" />

			<input type="hidden" name="hasProductOptions" th:value="*{!#lists.isEmpty(productOptions)}" />
			<input type="submit" class="addToCart" value="Comprar!"/>
		</blc:form>
	</div>
	
</div>

<div style="display: none;" th:id="*{'productOptions' + id}" class="product-options modal">
	<h3 th:text="*{name}"></h3>
	<div class="product-options" th:substituteby="catalog/partials/productOptions"/>
	<input type="button" class="addToCart" value="Comprar!" />
</div>